Commands > The command API > commandButtons() |
![]() ![]() ![]() |
Description
Defines the buttons that should appear on the right side of the Options dialog box and their behavior when clicked. If this function is not defined, no buttons appear, and the BODY
of the Command file expands to fill the entire dialog box.
Arguments
None.
Returns
An array containing an even number of elements. The first element is a string containing the label for the topmost button. The second element is a string of JavaScript code that defines the behavior of the topmost button when clicked. Remaining elements define additional buttons in the same manner.
Example
The following instance of commandButtons()
defines three buttons: OK, Cancel, and Help.
function commandButtons(){ return new Array("OK" , "doCommand()" , ¬ "Cancel" , "window.close()" , "Help" , "showHelp()"); }
![]() ![]() ![]() |